#!/usr/bin/env bash
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# This software is provided as-is,
# without warranty or representation for any use or purpose.
# Your use of it is subject to your agreement with Google.

#
#
# name: setup-users-config.sh
# description:  adds test users defined in metadata or default
#


# VARs set from wrapper based on environment deployment
# shellcheck disable=SC2034
CLUST_REALM="${KEY_CLUST_REALM}"
ANALYTICS_CLUST="${CLIENT_CLUST}"
METASTORE_CLUST="${HMS_CLUST}"
ANALYTICS_REALM="${CLIENT_REALM}"
METASTORE_REALM="${HMS_REALM}"
DOMAIN="${HOST_DOMAIN}"
KMS_KEY_URI="${CLUST_KMS_KEY_URI}"

CLIENT_RESOURCES_PATH="gs://${CLIENT_BASE_GCS_PATH}"

# Placeholder to render logic defined in setup-users-config.sh.logic
# shellcheck disable=SC2154
${logic}
